A network address translation (NAT) is a translation technology that converts a private address into a public Internet Protocol (IP) address, and is widely applied to various types of network access manners and various types of networks. As a common comprehensive NAT traversal technology, interactive connectivity establishment (ICE) can integrate various NAT traversal technologies to enable a Session Initiation Protocol (SIP)-based client to traverse a firewall.
A main process of ICE includes collecting address information of both communication parties; exchanging the address information of both communication parties; performing matching on the address information of both communication parties, forming a connectivity test list, and for address pairs in the list, sequentially determining connectivity of the address pairs using four handshakes. An optimal network route is selected according to a connectivity test result and a selection standard.
When a connection is interrupted due to a client crash, a user misoperation or the like, both communication parties need to perform connection recovery according to the foregoing ICE process; address collection and a connectivity test still need to be performed for both communication parties, thereby leading to long connection recovery time, and severely affecting user experience.